package com.shop.bank.pojo;

import java.math.BigDecimal;
import java.util.List;

public class Account {

    private int id;
    private String cardNo;
    private String password;
    private BigDecimal balance;
    private int status;
    private List<Transactionrecord> trans;

    public Account() {
    }

    public Account(int id, String cardNo, String password, BigDecimal balance, int status) {
        this.id = id;
        this.cardNo = cardNo;
        this.password = password;
        this.balance = balance;
        this.status = status;
        this.setTrans(getTrans());
    }

    @Override
    public String toString() {
        return "account{" +
                "id=" + id +
                ", cardNo='" + cardNo + '\'' +
                ", password='" + password + '\'' +
                ", balance=" + balance +
                ", status=" + status +
                '}';
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getCardNo() {
        return cardNo;
    }

    public void setCardNo(String cardNo) {
        this.cardNo = cardNo;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public BigDecimal getBalance() {
        return balance;
    }

    public void setBalance(BigDecimal balance) {
        this.balance = balance;
    }

    public int getStatus() {
        return status;
    }

    public void setStatus(int status) {
        this.status = status;
    }

    public List<Transactionrecord> getTrans() {
        return trans;
    }

    public void setTrans(List<Transactionrecord> trans) {
        this.trans = trans;
    }
}
